package com.ou.csbs.capstone.views.menu;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JToolBar;
/**
 * The ToolBar Swing object shown towards the top of the window. It contains the icons used to select which tool you wish to use, the Draw settings icon, and the "Clear All Drawn Objects" icon.
 * 
 * @author Senior Capstone
 */
public class ToolBar extends JToolBar{
	private static final long serialVersionUID = 4025097542550143825L;
	
	private JButton normal = new JButton(new ImageIcon(this.getClass().getResource("cursor.gif")));
	private JButton line = new JButton(new ImageIcon(this.getClass().getResource("line.gif")));
	private JButton circle = new JButton(new ImageIcon(this.getClass().getResource("circle.gif")));
	private JButton polyline = new JButton(new ImageIcon(this.getClass().getResource("polygon.gif")));
	private JButton freehand = new JButton(new ImageIcon(this.getClass().getResource("freehand.gif")));
	private JButton text = new JButton(new ImageIcon(this.getClass().getResource("text.gif")));
	private JButton clearObjects = new JButton(new ImageIcon(this.getClass().getResource("eraser.gif")));
	private JButton measurement = new JButton(new ImageIcon(this.getClass().getResource("measurement.gif")));
	private JButton shapeSettings = new JButton(new ImageIcon(this.getClass().getResource("palette.gif")));
	
	public ToolBar() {
		populate();
	}
	
	public void populate() {
		setFloatable(false);
		add(normal);
		add(new Separator());
		add(line);
		add(circle);
		add(polyline);
		add(freehand);
		add(text);
		add(clearObjects);
		add(new Separator());
		add(measurement);
		add(new Separator());
		add(shapeSettings);
	}
	public JButton getNormal(){
		return normal;
	}
	public JButton getLine(){
		return line;
	}
	public JButton getCircle(){
		return circle;
	}
	public JButton getPolyLine(){
		return polyline;
	}
	public JButton getFreehand(){
		return freehand;
	}
	public JButton getText(){
		return text;
	}
	public JButton getClearObjects(){
		return clearObjects;
	}
	public JButton getShapeSettings() {
		return shapeSettings;
	}
	public JButton getMeasurement(){
		return measurement;
	}
	
}
